package com.zhc.validate.handler;

import com.zhc.validate.entity.Parameter;
import com.zhc.validate.entity.Result;
import com.zhc.validate.entity.Task;
import com.zhc.validate.generator.RandomArgumentsGenerator;
import com.zhc.validate.parser.ParameterParser;
import jdk.jfr.Description;

import java.util.List;


@Description("任务处理器")
public class TaskHandler {


    /**
     * 处理任务
     *
     * @param task 任务
     */
    public static void handle(Task task) {
        List<Parameter> arguments = ParameterParser.parse(task);

        Object[] args = RandomArgumentsGenerator.generate(arguments);

        Result result = exec(task, args);
    }

    public static Result exec(Task task, Object[] args) {

        return null;
    }
}